<template>
  <div id="selected">
    <div id="center">
      <div>
        <div class="selected_title">
          <b>精选推荐</b>
        </div>
        <div class="tabpage">
          <button id="bt1" @click="fun('Btone')">会员折扣</button>
          <button id="bt2" @click="fun('Bttwo')">会员免费</button>
        </div>
        <component :is="com"></component>
        <div class="tabbtn">
          <div class="button_ipt">
            <input type="button" value="上一页" @click="fun('Btone')">
            <input type="button" value="下一页" @click="fun('Bttwo')">
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import Btone from "./bt1page.vue";
import Bttwo from "./bt2page.vue";
export default {
  methods: {
    fun(data) {
      this.com = data;
    }
  },
  data() {
    return {
      com: "Btone",
    };
  },
  components: {
    Btone,
    Bttwo
  }
};
</script>

<style scoped>
#selected {
  width: 100%;
  margin-bottom: 0.16rem;
}
#center {
  width: 3.45rem;
  margin: auto;
}
.selected_title {
  width: 100%;
  height: 0.54rem;
  line-height: 0.32rem;
  font-size: 0.18rem;
}
.tabpage {
  width: 100%;
  height: 0.32rem;
}
.tabpage button {
  width: 0.8rem;
  height: 0.32rem;
  line-height: 0.32rem;
  border-style: none;
  background-color: white;
}
#bt1 {
  color: orange;
}
.bt1 {
  color: orange;
}
.tabbtn {
  width: 100%;
  height: 0.42rem;
}
.button_ipt {
  width: 1.8rem;
  height: 100%;
  margin: auto;
  line-height: 0.42rem;
}
.tabbtn .button_ipt input {
  width: 0.7rem;
  height: 0.3rem;
  font-size: 0.12rem;
  margin-left: 0.05rem;
  margin-right: 0.05rem;
}
.tabbtn .button_ipt input:nth-child(1) {
  color: #c2c4c3;
}
</style>
